lcDrwExplode Home

Explodes all entities of a drawing to simpler entities.

 BOOL lcDrwExplode (
   HANDLE hDrw,
   int Mode
 );

Parameters
hDrw
  Handle to a drawing object.
Mode
  Specifies type of entities which remains in a drawing as a result of exploding.

Mode Entity type
LC_DRWEXP_L Lines
LC_DRWEXP_P Polylines
LC_DRWEXP_LA Lines, arcs and circles
LC_DRWEXP_PA Polylines, arcs and circles

Return Value

  If the function succeeds, the return value is nonzero (TRUE).


Code sample:
  HANDLE hDrw;
  WCHAR* szFileNameIn = L"c:/!OK/Data/Drawings/Sample for explode.lcd";
  WCHAR* szFileNameOut = L"c:/!OK/Data/Drawings/Exploded.lcd";

  hDrw = lcCreateDrawing();
  if (hDrw != 0){
    if (lcDrwLoad( hDrw, szFileNameIn, 0 ) == TRUE){
      if (lcDrwExplode( hDrw, LC_DRWEXP_L ) == TRUE){
        lcDrwSave( hDrw, szFileNameOut, false, 0 );
      }
    }
    lcDeleteDrawing( hDrw );
  }